package cd;

/**
 * Created by tecsun on 2018/9/25.
 */

public class CommonStatus {

    /** 函数参数类型错误  **/
    public static final int PARAM_TYPE_ERR = -101;

    /** 操作成功  **/
    public static final int SP_OPERATE_OK = 0;
    /** 打开串口出错  **/
    public static final int SP_OPEN_ERR = -201;
    /** 没有打开串口，请先调用open方法  **/
    public static final int SP_NOT_OPEN = -202;
    /** 串口发送数据出错  **/
    public static final int SP_WRITE_ERR = -203;
    /** 串口读取数据超时  **/
    public static final int SP_READ_TIMEOUT = -204;
    /** 串口读取数据出错  **/
    public static final int SP_READ_ERR = -205;
    /** 用于接收数据的数组长度不够 **/
    public static final int SP_READ_BUFFER_NOT_ENOUGH = -206;


    /** 操作成功  **/
    public static final int BT_OPERATE_OK = 0;
    /** android设备没有蓝牙功能  **/
    public static final int BT_DEVICE_HAS_NOT_BLUETOOTH_MODULE = -301;
    /** mac address is null or empty!
     *  mac address is not correct! make sure it's upper case!
     *  **/
    public static final int BT_MAC_ERR = -302;
    /** 连接设备失败  **/
    public static final int BT_CONNECT_FAILED = -303;
    /** 蓝牙发送数据出错  **/
    public static final int BT_WRITE_ERR = -304;
    /** 还没打开蓝牙  **/
    public static final int BT_NOT_OPEN = -305;
    /** 设备不支持蓝牙  **/
    public static final int BT_NOT_SUPPORT = -306;
    /** 还未连接，请先调用connect()  **/
    public static final int BT_NOT_CONNECT = -307;
    /** 蓝牙读取数据超时  **/
    public static final int BT_READ_TIMEOUT = -308;

    /** 用于接收数据的数组长度不够 **/
    public static final int BT_READ_BUFFER_NOT_ENOUGH = -309;

    /** 操作成功  **/
    public static final int USB_OPERATE_OK = 0;
    /** 连接设备失败  **/
    public static final int USB_CONNECT_FAILED = -401;
    /** 没有权限连接usb设备  **/
    public static final int USB_CONNECT_NOPERMISSION = -402;
    /** 还未连接，请先调用connect()  **/
    public static final int USB_NOT_CONNECT = -403;
    /** USB读取数据超时  **/
    public static final int USB_READ_TIMEOUT = -404;


    /** 打开蓝牙请求码 **/
    public static final int ACTI_REQUESTCODE_OPEN_BT = 301;


}
